<section id="status_form" class="modal_view size_extralarge">
	<form class='form' data-url='{{ url }}' method='POST'>
		<div role="dialog" id="status-forms" aria-modal="true" aria-labelledby="status-forms_title">
			<div class="modal_layout">
				<header {{#if has_error}}class='caution'{{/if}}>
					<button type='button' class="icon only unstyled close" title="Fermer cette fenêtre" aria-label="Fermer cette fenêtre" onclick="toggleModal('status_form'); return false;">
						<svg><use href="/static/icons/endi.svg#times"></use></svg>
					</button>
					<h2 id="status-forms_title">{{ title }}</h2>
				</header>
				<div class="layout flex two_cols third_reverse pdf_viewer">
					<div class="preview"></div>
					<div class="modal_content_layout">
						<div class="modal_content">
							{{#if help_text }}
							<div class='alert alert-info'>{{ help_text }}</div>
							{{/if}}
							<div>
								{{#if ask_for_date }}
								<div class='form-group'>
									<div class='alert alert-danger'>
										<span class="icon"><svg><use href="/static/icons/endi.svg#danger"></use></svg></span> 
										La date du document diffère de la date du jour
									</div>
									<div class="radio">
									<label>
										<input type="radio" name="change_date" value='1' checked>
										<span>Mettre à la date d’aujourd’hui {{ today }}</span>
									</label>
									</div>
									<div class="radio">
									<label>
										<input type="radio" name="change_date" value='0'>
										<span>Conserver la date {{ date }}</span>
									</label>
									</div>
								</div>
								<hr />
								{{/if}}
								{{#if has_file_warning}}
								<div class='form-group'>
									<table class='files'></table>
									<div class="checkbox">
										<label>
											<input type="checkbox" name="force_file_validation">
											<span>Ignorer les fichiers manquants</span>
										</label>
									</div>
								</div>
								{{/if}}
								<div class='form-group'>
									<label for='comment'>Mémo</label>
									<textarea class='form-control' name='comment' id='comment' rows=4></textarea>
									<span class="help-block">Ajouter un commentaire au mémo de demande de validation</span>
								</div>
								{{#if cancel_resulted_invoice_warning}}
								<div class='alert alert-danger'>
									<span class="icon"><svg><use href="/static/icons/endi.svg#danger"></use></svg></span> 
									Cet avoir concerne une facture soldée
								</div>
								{{/if}}
							</div>
						</div>
						<footer>
							<button class='btn btn-primary' {{#if has_file_warning}}disabled aria-disabled='true'{{/if}} type='button' name='submit' value='{{status}}'>
								{{label}}
							</button>
							<button type="button" class='btn cancel'>
								Annuler
							</button>
						</footer>
					</div>
				</div>
			</div>
		</div>
	</form>
</section>
